<div id='user_container'>
<a href="<?php echo $this->url(array('controller' => 'user', 'action' => 'add')); ?>">Add a new user.</a>
<?php echo $this->form; ?>
<br />
  <table border ="1px">
	<tr>
	  <th>id</th>
	  <th>name(
<a href='<?php echo $this->url(array('sort'=>'username')); ?>'>sort</a>
)	  </th>
	  <th>role(
	<a href='<?php echo $this->url(array('sort'=>'role')); ?>'>sort</a>
	)  </th>
	<tr>
<?php
$i = 0;

foreach ($this->paginatorUsers as $user):
?>
	<tr>

	  <td><?php echo ++$this->PageStartIterator;?></td>
 	  <td><?php echo $this->escape($user->username)?></td>
 	  <td><?php echo $this->escape($user->role)?></td>
 	  <td>
 	  <a href='<?php echo $this->url(array('controller'=>'user','action'=>'edit', 'id'=>$user->id)); ?>'>edit</a><hr />
 	  <a href='<?php echo $this->url(array('controller'=>'user','action'=>'delete', 'id'=>$user->id)); ?>'>delete</a>
 	  </td>

 	</tr>
<?php endforeach; ?>

  </table>
<?php //echo $this->user->username.'|'.$this->user->role;
?>
<?php echo $this->paginationControl($this->paginatorUsers, 'Sliding', 'templates\paginator.phtml', array( 'sortFields' => $this->sortFields));?>
</div>

